package com.cie2.map.entities;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.tapestry5.beaneditor.NonVisual;
import org.apache.tapestry5.beaneditor.Validate;

@Entity
@Table(name="area")
public class Area {

	public enum AreaType {
		Propinsi, Kabupaten, Kecamatan, Kelurahan
	}
	
	private Long id;
	
	private String name;
	
	// propinsi, kotamadya, kecamatan, kelurahan
	private AreaType type;

	private String defaultAreaColor;

	private String defaultLineColor;
	
	private Integer minLayer;
	
	private Integer maxLayer;
	
	private String mapCenter;
	
	@Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @NonVisual	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Validate("required")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}


	public AreaType getType() {
		return type;
	}

	public void setType(AreaType type) {
		this.type = type;
	}

	public Integer getMinLayer() {
		return minLayer;
	}

	public void setMinLayer(Integer minLayer) {
		this.minLayer = minLayer;
	}

	public Integer getMaxLayer() {
		return maxLayer;
	}

	public void setMaxLayer(Integer maxLayer) {
		this.maxLayer = maxLayer;
	}

	@Validate("required")
	public String getDefaultAreaColor() {
		return defaultAreaColor;
	}

	public void setDefaultAreaColor(String defaultAreaColor) {
		this.defaultAreaColor = defaultAreaColor;
	}

	@Validate("required")
	public String getDefaultLineColor() {
		return defaultLineColor;
	}

	public void setDefaultLineColor(String defaultLineColor) {
		this.defaultLineColor = defaultLineColor;
	}

	@Validate("required")
	public String getMapCenter() {
		return mapCenter;
	}

	public void setMapCenter(String mapCenter) {
		this.mapCenter = mapCenter;
	}


	
}
